﻿using System;
using System.Collections.Generic;

namespace JTLeigh.Commerce.Spencer.Features.ProductImages.Common.Entities
{

	/// <summary>
	/// Represents an image size.
	/// </summary>
	/// <remarks>
	/// <para>
	/// Examples of image sizes are &quot;Thumbnail&quot;, &quot;Small&quot;, &quot;Medium&quot;, 
	/// &quot;Large&quot;, etc.
	/// </para>
	/// </remarks>
	public class ProductImageSize
	{

		#region Constructors

		/// <summary>
		/// Initializes a new instance of the <see cref="ProductImageSize"/> class.
		/// </summary>
		public ProductImageSize()
		{
			Localizations = new Dictionary<int, ProductImageSizeLocalization>();
		}

		#endregion // Constructors

		#region Properties

		/// <summary>
		/// Gets or sets the size identifier.
		/// </summary>
		/// <value>A size identifier <see cref="Guid"/>.</value>
		public Guid SizeId { get; set; }

		/// <summary>
		/// Gets or sets the well-known size code.
		/// </summary>
		/// <value>A well-known size code <see cref="Byte"/>.</value>
		public byte WellKnownSizeCode { get; set; }

		/// <summary>
		/// Gets or sets the width of the image.
		/// </summary>
		/// <value>An <see cref="Int16"/> pixel width.</value>
		public short Width { get; set; }

		/// <summary>
		/// Gets or sets the height of the image.
		/// </summary>
		/// <value>An <see cref="Int16"/> pixel height.</value>
		public short Height { get; set; }

		/// <summary>
		/// Gets or sets the order in which the size should be displayed.
		/// </summary>
		/// <value>An <see cref="Int32"/> ordinal position.</value>
		public int DisplayOrder { get; set; }

		/// <summary>
		/// Gets or sets the default name of the size.
		/// </summary>
		public string DefaultName { get; set; }

		/// <summary>
		/// Gets or sets the default missing image path for the size.
		/// </summary>
		public string DefaultMissingImagePath { get; set; }

		/// <summary>
		/// Gets the dictionary of the size's localizations.
		/// </summary>
		/// <value>A <see cref="Dictionary{TKey,TValue}"/> of <see cref="ProductImageSizeLocalization"/>
		/// keyed by culture identifier.</value>
		public Dictionary<int, ProductImageSizeLocalization> Localizations { get; private set; }

		#endregion // Properties

	}

}
